'''
# -*- coding:utf-8 -*-
# @Project: DevOps_api
# @Date: 2023/3/17 - 17:46
# @Author: ysg
# @Describe: 

devops_influxdb.py
'''
from influxdb import InfluxDBClient


def do_influx():
    # 连接远端
    # client = InfluxDBClient(host='mydomain.com', port=8086, username='myuser', password='mypass', ssl=True, verify_ssl=True)
    # 连接本地， 切换数据库
    client = InfluxDBClient(host='devops_influxdb', port=8086, username='admin', password='www.123.com')
    client.switch_database('devops_info')
    return client
